package it.probabili.formazioni.download.base;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;

public class DownloadBase {

	/**
	 * Scarica xml da http
	 * @param url
	 * @return InputStream
	 * @throws IOException
	 */
	public static InputStream downloadFromUrl(URL url) throws IOException {
		InputStream is = null;

		try {
			URLConnection urlConn = url.openConnection();

			is = urlConn.getInputStream();

		} catch (Exception e) {
			e.printStackTrace();
		}
		return is;

	}
	
	
}
